﻿<UserControl x:Class="Mengsk.ProxyDelivery.Print.UI.WuliuNumberUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="1400" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal" >
            <TextBlock Text="订单编号:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbOrderId" Margin="3" VerticalAlignment="Center" Width="120"/>
            <TextBlock Text="快递公司:" Margin="3" VerticalAlignment="Center"/>
            <ComboBox Name="cbbDeliveryCompany" Margin="3" VerticalAlignment="Center" Width="120"/>
            <TextBlock Text="运单编号:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbDeliveryNumber" Margin="3" VerticalAlignment="Center" Width="120" />
            <TextBlock Text="开始时间:" Margin="3" VerticalAlignment="Center"/>
            <xctk:DateTimePicker Name="dpStart" Margin="3" VerticalAlignment="Center" Width="160" Format="Custom" FormatString="yyyy-MM-dd HH:mm:ss"/>
            <TextBlock Text="结束时间:" Margin="3" VerticalAlignment="Center"/>
            <xctk:DateTimePicker Name="dpEnd" Margin="3" VerticalAlignment="Center" Width="160"  Format="Custom" FormatString="yyyy-MM-dd HH:mm:ss"/>
            <Button Name="btnSearch" Content="查询" Margin="3" VerticalAlignment="Center" Width="60" Click="btnSearch_Click"/>
            <Button Name="btnCancelAndDelete" Content="解绑删除" Margin="3" VerticalAlignment="Center" Width="60" Click="btnCancelAndDelete_Click"/>
        </StackPanel>

        <DataGrid Name="dgvWuliuNumbers" Grid.Row="1" AutoGenerateColumns="False" SelectionMode="Extended" SelectionUnit="CellOrRowHeader" Margin="3"
                  CanUserAddRows="False" IsReadOnly="True"
                  >
            <DataGrid.Columns>
                <DataGridTextColumn Header="物流编号" Binding="{Binding WuliuId}"/>
                <DataGridTextColumn Header="快递公司" Binding="{Binding DeliveryCompany}"/>
                <DataGridTextColumn Header="快递单号" Binding="{Binding DeliveryNumber}"/>
                <DataGridTextColumn Header="创建时间" Binding="{Binding CreateTime,Converter={StaticResource datetimeConverter}}" />
                <DataGridTextColumn Header="收货人姓名" Binding="{Binding ReceiverName}"/>
                <DataGridTextColumn Header="收货人电话" Binding="{Binding ReceiverPhone}"/>
                <DataGridTextColumn Header="收货人手机" Binding="{Binding ReceiverMobile}"/>
                <DataGridTextColumn Header="收货人地址" Binding="{Binding ReceiverAddress}"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>
